// Type definitions

export interface User {
  id: number;
  username: string;
  max_bandwidth_up: number;
  max_bandwidth_down: number;
  traffic_limit: number | null;
  traffic_used: number;
  expire_at: string | null;
  enabled: boolean;
  created_at: string;
  updated_at: string;
}

export interface TrafficStats {
  users: Record<string, UserTraffic>;
  total_tx: number;
  total_rx: number;
}

export interface UserTraffic {
  tx: number;
  rx: number;
  online: boolean;
  connections: number;
}

export interface ServerStatus {
  running: boolean;
  uptime: number;
  version: string;
}

export interface SystemMetrics {
  cpu_usage: number;
  memory_usage: number;
  memory_total: number;
  uptime: number;
}

export interface ApiResponse<T> {
  data?: T;
  error?: string;
}
